<template>
    <div class="programModify">
        <el-form 
            ref="ruleForm" 
            label-width="60px"
            :model="ruleForm">
            <el-form-item label="名称" prop="name">
                <el-input  v-model="ruleForm.name"></el-input>
            </el-form-item>
        </el-form>
       <el-button @click="submitForm('ruleForm')" size="medium" class="addSubimit">修改</el-button>
    </div>
</template>
<script>
import { AddData } from '@/assets/js'
export default {
     data(){
        return {
            ruleForm:{
                name:this.AppName,   
            }
        }
    },
    methods:{
        submitForm:function(e){
            let data = {
                appname:this.ruleForm.name==''?this.AppName:this.ruleForm.name,
                appid:this.APPID
            }
            AddData(this,e,data,'program/editProgram')
        }
    },
    props:['APPID',"AppName"],
    mounted:function(){
        console.log(this.APPID)
    }
}
</script>